<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:p="http://primefaces.org/ui"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core">

    <h:form id="administration-tree-form">

        <p:selectOneMenu value="#{treeAdministrationBean.selectedGroupId}">
            <f:selectItem itemLabel="Select..."/>
            <f:selectItems itemLabel="#{g.nme}" itemValue="#{g.id}" value="#{treeAdministrationBean.groups}" var="g"/>
            <p:ajax listener="#{treeAdministrationBean.onChangeGroup}" update="tree-admin-comp-id"/>
        </p:selectOneMenu>

        <p:tree id="tree-admin-comp-id" var="node" dynamic="false" value="#{treeAdministrationBean.rootModel}"
                selection="#{treeAdministrationBean.selectedTreeNodes}" selectionMode="checkbox"
                style="border: none;width :480px;">

            <p:treeNode icon="#{node.tpeIco}" expandedIcon="ui-icon-folder-open" collapsedIcon="ui-icon-folder-collapsed">
                <h:outputText value="#{node.name}"/>
            </p:treeNode>

        </p:tree>

        <p:commandButton value="Save" icon="ui-icon-disk" update="checkboxTree" actionListener="#{treeAdministrationBean.saveRoleTreeNodes}"/>

    </h:form>

</ui:composition>